package cn.itsource.service;

import cn.itsource.pojo.app.bo.ConfirmBo;
import cn.itsource.pojo.app.bo.CustomerDetailBo;
import cn.itsource.pojo.app.bo.FlushCustomerBo;
import cn.itsource.pojo.app.vo.*;
import cn.itsource.pojo.domain.Order;
import cn.itsource.pojo.vo.DriverLocationVo;
import cn.itsource.pojo.vo.SharedDriverLocationVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author beishan
 * @since 2024-04-10
 */
public interface IOrderService extends IService<Order> {

    //下单
    List<CreateOrderVo> advance(AdvanceVo vo);

    //司机拉取订单
    List<CreateOrderVo>  pull2Order();

    //司机抢单
    void killOrder(String id);

    //自动取消订单
    void autochange(String id);

    //取消订单
    void change(String id);

    //订单回显
    ExecuteOrderVo execute();

    //司机到达代驾点
    void arrive2driver(String orderNo);

    //司乘同显
    LocationVo location(String orderNo);

    //拉取订单状态
    Boolean pullOrderStatus(String orderNo);

    //实时将司机id 保存到redis
    void location2driver(DriverLocationVo driverLocationVo);

    //从redis中获取司机 位置
    SharedDriverLocationVo pullDriverLocation(String orderNo);
    //根据状态回显订单信息
    FlushCustomerBo flush();

    //开始代驾
    void startDriving(String orderNo);

    //结束代驾
    BigDecimal endDriving(String orderNo);

    //确认费用
    void confirm(ConfirmBo confirmBo);

    //账单 详情
    DriverBillVo orderBill(String orderNo);

    //账单发送
    void send(String orderNo);

    //订单详情
    CustomerDetailBo detail(String orderNo);
}
